//
//  userCountModel.swift
//  上海微博
//
//  Created by zhangliming on 16/3/6.
//  Copyright © 2016年 zhangliming. All rights reserved.
//

import UIKit

class userCountModel: NSObject {

    var uid:String?

    //用户名

    var screen_name:String?

    //用户口令

    var access_token:String?

    //token生命周期开时间

    var expireDate:NSDate?

    var expires_in:NSTimeInterval = 0{

        didSet{

    expireDate = NSDate(timeIntervalSinceNow:expires_in)

        }
    }

    //用户大图

    var avatar_large:String?

    //字典转模型

    init(dict: [String:AnyObject]) {

    super.init()

        setValuesForKeysWithDictionary(dict)

    }

    //空值过滤

    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }

    //重写这个属性可以方便以后调试

   override var description: String {

        let key = ["uid", "screen_name", "access_token", "expires_in", "avatar_large","expireDate"]

        return dictionaryWithValuesForKeys(key).description

    }
}
